<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <title></title>
  <meta http-equiv="X-UA-Compatible" content="chrome=1" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="renderer" content="webkit">
  <meta name="author" content="yb">
  <meta name="keywords" content="关键词" />
  <meta name="description" content="描述" />
  <meta http-equiv="Pragma" content="no-cache">
  <meta http-equiv="Cache-Control" content="no-cache, must-revalidate">
  <meta http-equiv="Expires" content="0">
  <!-- <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" /> -->
  <script src="https://cdn.bootcss.com/jquery/1.10.1/jquery.min.js"></script>
  <link rel="stylesheet" href="../style/css/base.css">
  <script src="https://cdn.bootcss.com/vue/2.6.0/vue.min.js"></script>
  <script src="https://cdn.bootcss.com/echarts/4.2.1/echarts.min.js"></script>
  <script>!function (r, t) { "object" == typeof exports && "object" == typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define([], t) : "object" == typeof exports ? exports.ecStat = t() : r.ecStat = t() }(this, function () { return function (r) { function t(e) { if (n[e]) return n[e].exports; var o = n[e] = { exports: {}, id: e, loaded: !1 }; return r[e].call(o.exports, o, o.exports, t), o.loaded = !0, o.exports } var n = {}; return t.m = r, t.c = n, t.p = "", t(0) }([function (r, t, n) { var e; e = function (r) { return { clustering: n(11), regression: n(13), statistics: n(14), histogram: n(12) } }.call(t, n, t, r), !(void 0 !== e && (r.exports = e)) }, function (r, t, n) { var e; e = function (r) { function t(r) { return r = null === r ? NaN : +r, "number" == typeof r && !isNaN(r) } function n(r) { return isFinite(r) && r === Math.round(r) } return { isNumber: t, isInteger: n } }.call(t, n, t, r), !(void 0 !== e && (r.exports = e)) }, function (r, t, n) { var e; e = function (r) { function t(r) { if (!a(r)) throw new Error("Invalid data type, you should input an array"); var t = [], n = u(r); if (1 === n.length) for (var e = 0; e < n[0]; e++)f(r[e]) && t.push(r[e]); else if (2 === n.length) for (var e = 0; e < n[0]; e++) { for (var o = !0, i = 0; i < n[1]; i++)f(r[e][i]) || (o = !1); o && t.push(r[e]) } return t } function e(r) { var t = r.toString(), n = t.indexOf("."); return n < 0 ? 0 : t.length - 1 - n } var o = n(4), a = o.isArray, u = o.size, i = n(1), f = i.isNumber; return { dataPreprocess: t, getPrecision: e } }.call(t, n, t, r), !(void 0 !== e && (r.exports = e)) }, function (r, t, n) { var e; e = function (r) { return function (r, t) { var n = r.length; if (!n) return 0; if (t <= 0 || n < 2) return r[0]; if (t >= 1) return r[n - 1]; var e = (n - 1) * t, o = Math.floor(e), a = r[o], u = r[o + 1]; return a + (u - a) * (e - o) } }.call(t, n, t, r), !(void 0 !== e && (r.exports = e)) }, function (r, t, n) { var e; e = function (r) { function t(r) { for (var t = []; n(r);)t.push(r.length), r = r[0]; return t } function n(r) { return "[object Array]" === l.call(r) } function e(r, t) { for (var n = [], e = 0; e < r; e++) { n[e] = []; for (var o = 0; o < t; o++)n[e][o] = 0 } return n } function o(r) { for (var t = 0, n = 0; n < r.length; n++)t += r[n]; return t } function a(r, t) { for (var n = 0, e = 0; e < r.length; e++)n += r[e][t]; return n } function u(r, t) { return r > t ? 1 : r < t ? -1 : r === t ? 0 : NaN } function i(r, t, n, e) { for (null == n && (n = 0), null == e && (e = r.length); n < e;) { var o = Math.floor((n + e) / 2), a = u(r[o], t); if (a > 0) e = o; else { if (!(a < 0)) return o + 1; n = o + 1 } } return n } function f(r, t, n) { if (r && t) { if (r.map && r.map === c) return r.map(t, n); for (var e = [], o = 0, a = r.length; o < a; o++)e.push(t.call(n, r[o], o, r)); return e } } var l = Object.prototype.toString, s = Array.prototype, c = s.map; return { size: t, isArray: n, zeros: e, sum: o, sumOfColumn: a, ascending: u, bisect: i, map: f } }.call(t, n, t, r), !(void 0 !== e && (r.exports = e)) }, function (r, t, n) { var e; e = function (r) { var t = n(9); return function (r) { var n = t(r); return n ? Math.sqrt(n) : n } }.call(t, n, t, r), !(void 0 !== e && (r.exports = e)) }, function (r, t, n) { var e; e = function (r) { function t(r) { for (var t = -(1 / 0), n = 0; n < r.length; n++)o(r[n]) && r[n] > t && (t = r[n]); return t } var e = n(1), o = e.isNumber; return t }.call(t, n, t, r), !(void 0 !== e && (r.exports = e)) }, function (r, t, n) { var e; e = function (r) { function t(r) { var t = r.length; return t ? e(r) / r.length : 0 } var e = n(10); return t }.call(t, n, t, r), !(void 0 !== e && (r.exports = e)) }, function (r, t, n) { var e; e = function (r) { function t(r) { for (var t = 1 / 0, n = 0; n < r.length; n++)o(r[n]) && r[n] < t && (t = r[n]); return t } var e = n(1), o = e.isNumber; return t }.call(t, n, t, r), !(void 0 !== e && (r.exports = e)) }, function (r, t, n) { var e; e = function (r) { function t(r) { var t = r.length; if (!t || t < 2) return 0; if (r.length >= 2) { for (var n, e = a(r), u = 0, i = 0; i < r.length; i++)o(r[i]) && (n = r[i] - e, u += n * n); return u / (r.length - 1) } } var e = n(1), o = e.isNumber, a = n(7); return t }.call(t, n, t, r), !(void 0 !== e && (r.exports = e)) }, function (r, t, n) { var e; e = function (r) { function t(r) { var t = r.length; if (!t) return 0; for (var n = 0, e = 0; e < t; e++)o(r[e]) && (n += r[e]); return n } var e = n(1), o = e.isNumber; return t }.call(t, n, t, r), !(void 0 !== e && (r.exports = e)) }, function (r, t, n) { var e; e = function (r) { function t(r, t) { for (var n, o, i, f, l = s(r), c = v(l[0], 2), h = a(r, t), p = !0; p;) { p = !1; for (var g = 0; g < l[0]; g++) { n = 1 / 0, o = -1; for (var M = 0; M < t; M++)i = u(r[g], h[M]), i < n && (n = i, o = M); c[g][0] !== o && (p = !0), c[g][0] = o, c[g][1] = d(n, 2) } for (var g = 0; g < t; g++) { f = []; for (var M = 0; M < c.length; M++)c[M][0] === g && f.push(r[M]); h[g] = e(f) } } var x = { centroids: h, clusterAssigned: c }; return x } function e(r) { for (var t, n, e = s(r), o = [], a = 0; a < e[1]; a++) { t = 0; for (var u = 0; u < e[0]; u++)t += r[u][a]; n = t / e[0], o.push(n) } return o } function o(r, n, o) { function a() { if (F < n) { y = 1 / 0; for (var r, e, o, a = 0; a < x.length; a++) { b = [], w = []; for (var u = 0; u < g.length; u++)g[u][0] === a ? b.push(l[u]) : w.push(g[u][1]); N = t(b, 2), A = c(N.clusterAssigned, 1), q = h(w), A + q < y && (y = q + A, r = a, e = N.centroids, o = N.clusterAssigned) } for (var u = 0; u < o.length; u++)0 === o[u][0] ? o[u][0] = r : 1 === o[u][0] && (o[u][0] = x.length); for (x[r] = e[0], x.push(e[1]), u = 0, a = 0; u < g.length && a < o.length; u++)g[u][0] === r && (g[u][0] = o[a][0], g[u][1] = o[a++][1]); for (var i = [], u = 0; u < x.length; u++) { i[u] = []; for (var a = 0; a < g.length; a++)g[a][0] === u && i[u].push(l[a]) } P.clusterAssment = g, P.centroids = x, P.pointsInCluster = i, F++ } else P.isEnd = !0; return P } if (!(n < 2)) { for (var i, l = f(r), p = s(l), g = v(p[0], 2), M = e(l), x = [M], m = 0; m < p[0]; m++)i = u(l[m], M), g[m][1] = d(i, 2); var y, b, w, N, A, q, F = 1, P = { isEnd: !1 }, E = { next: a }; if (o) return E; for (var P; !(P = E.next()).isEnd;); return P } } function a(r, t) { for (var n, e, o, a = s(r), u = v(t, a[1]), i = 0; i < a[1]; i++) { n = r[0][i], e = r[0][i]; for (var f = 1; f < a[0]; f++)r[f][i] < n && (n = r[f][i]), r[f][i] > e && (e = r[f][i]); o = e - n; for (var f = 0; f < t; f++)u[f][i] = n + o * Math.random() } return u } function u(r, t) { if (!p(r) && !p(t)) return g(d(r - t, 2)); for (var n = 0, e = 0; e < r.length; e++)n += d(r[e] - t[e], 2); return g(n) } var i = n(2), f = i.dataPreprocess, l = n(4), s = l.size, c = l.sumOfColumn, h = l.sum, v = l.zeros, p = l.isArray, g = Math.sqrt, d = Math.pow; return { kMeans: t, hierarchicalKMeans: o } }.call(t, n, t, r), !(void 0 !== e && (r.exports = e)) }, function (r, t, n) { var e; e = function (r) { function t(r, t) { t = null == t ? g.squareRoot : g[t]; for (var n = f(r), a = e(n), u = o(n), i = t(n, u, a), l = p(u, a, i), s = -Math.floor(Math.log(Math.abs(a - u) / i) / Math.LN10), d = h(+(Math.ceil(u / l) * l).toFixed(s), +(Math.floor(a / l) * l).toFixed(s), l, s), M = d.length, x = new Array(M + 1), m = 0; m <= M; m++)x[m] = {}, x[m].sample = [], x[m].x0 = m > 0 ? d[m - 1] : d[m] - u === l ? u : d[m] - l, x[m].x1 = m < M ? d[m] : a - d[m - 1] === l ? a : d[m - 1] + l; for (var m = 0; m < n.length; m++)u <= n[m] && n[m] <= a && x[v(d, n[m], 0, M)].sample.push(n[m]); var r = c(x, function (r) { return [+((r.x0 + r.x1) / 2).toFixed(s), r.sample.length] }), y = c(x, function (r) { return [r.x0, r.x1, r.sample.length] }); return { bins: x, data: r, customData: y } } var e = n(6), o = n(8), a = n(3), u = n(5), i = n(2), f = i.dataPreprocess, l = (i.getPrecision, n(4)), s = l.ascending, c = l.map, h = n(16), v = l.bisect, p = n(17), g = { squareRoot: function (r) { var t = Math.ceil(Math.sqrt(r.length)); return t > 50 ? 50 : t }, scott: function (r, t, n) { return Math.ceil((n - t) / (3.5 * u(r) * Math.pow(r.length, -1 / 3))) }, freedmanDiaconis: function (r, t, n) { return r.sort(s), Math.ceil((n - t) / (2 * (a(r, .75) - a(r, .25)) * Math.pow(r.length, -1 / 3))) }, sturges: function (r) { return Math.ceil(Math.log(r.length) / Math.LN2) + 1 } }; return t }.call(t, n, t, r), !(void 0 !== e && (r.exports = e)) }, function (r, t, n) { var e; e = function (r) { function t(r, t) { for (var n = 0; n < r.length - 1; n++) { for (var e = n, o = n + 1; o < r.length - 1; o++)Math.abs(r[n][o]) > Math.abs(r[n][e]) && (e = o); for (var a = n; a < r.length; a++) { var u = r[a][n]; r[a][n] = r[a][e], r[a][e] = u } for (var i = n + 1; i < r.length - 1; i++)for (var f = r.length - 1; f >= n; f--)r[f][i] -= r[f][n] / r[n][n] * r[n][i] } for (var l = new Array(t), s = r.length - 1, o = r.length - 2; o >= 0; o--) { for (var u = 0, n = o + 1; n < r.length - 1; n++)u += r[n][o] * l[n]; l[o] = (r[s][o] - u) / r[o][o] } return l } var e = n(2), o = e.dataPreprocess, a = { linear: function (r) { for (var t = o(r), n = 0, e = 0, a = 0, u = 0, i = t.length, f = 0; f < i; f++)n += t[f][0], e += t[f][1], a += t[f][0] * t[f][1], u += t[f][0] * t[f][0]; for (var l = (i * a - n * e) / (i * u - n * n), s = e / i - l * n / i, c = [], h = 0; h < t.length; h++) { var v = [t[h][0], l * t[h][0] + s]; c.push(v) } var p = "y = " + Math.round(100 * l) / 100 + "x + " + Math.round(100 * s) / 100; return { points: c, parameter: { gradient: l, intercept: s }, expression: p } }, linearThroughOrigin: function (r) { for (var t = o(r), n = 0, e = 0, a = 0; a < t.length; a++)n += t[a][0] * t[a][0], e += t[a][0] * t[a][1]; for (var u = e / n, i = [], f = 0; f < t.length; f++) { var l = [t[f][0], t[f][0] * u]; i.push(l) } var s = "y = " + Math.round(100 * u) / 100 + "x"; return { points: i, parameter: { gradient: u }, expression: s } }, exponential: function (r) { for (var t = o(r), n = 0, e = 0, a = 0, u = 0, i = 0, f = 0, l = 0; l < t.length; l++)n += t[l][0], e += t[l][1], f += t[l][0] * t[l][1], a += t[l][0] * t[l][0] * t[l][1], u += t[l][1] * Math.log(t[l][1]), i += t[l][0] * t[l][1] * Math.log(t[l][1]); for (var s = e * a - f * f, c = Math.pow(Math.E, (a * u - f * i) / s), h = (e * i - f * u) / s, v = [], p = 0; p < t.length; p++) { var g = [t[p][0], c * Math.pow(Math.E, h * t[p][0])]; v.push(g) } var d = "y = " + Math.round(100 * c) / 100 + "e^(" + Math.round(100 * h) / 100 + "x)"; return { points: v, parameter: { coefficient: c, index: h }, expression: d } }, logarithmic: function (r) { for (var t = o(r), n = 0, e = 0, a = 0, u = 0, i = 0; i < t.length; i++)n += Math.log(t[i][0]), e += t[i][1] * Math.log(t[i][0]), a += t[i][1], u += Math.pow(Math.log(t[i][0]), 2); for (var f = (i * e - a * n) / (i * u - n * n), l = (a - f * n) / i, s = [], c = 0; c < t.length; c++) { var h = [t[c][0], f * Math.log(t[c][0]) + l]; s.push(h) } var v = "y = " + Math.round(100 * l) / 100 + " + " + Math.round(100 * f) / 100 + "ln(x)"; return { points: s, parameter: { gradient: f, intercept: l }, expression: v } }, polynomial: function (r, n) { var e = o(r); "undefined" == typeof n && (n = 2); for (var a = [], u = [], i = n + 1, f = 0; f < i; f++) { for (var l = 0, s = 0; s < e.length; s++)l += e[s][1] * Math.pow(e[s][0], f); u.push(l); for (var c = [], h = 0; h < i; h++) { for (var v = 0, p = 0; p < e.length; p++)v += Math.pow(e[p][0], f + h); c.push(v) } a.push(c) } a.push(u); for (var g = t(a, i), d = [], f = 0; f < e.length; f++) { for (var M = 0, s = 0; s < g.length; s++)M += g[s] * Math.pow(e[f][0], s); d.push([e[f][0], M]) } for (var x = "y = ", f = g.length - 1; f >= 0; f--)x += f > 1 ? Math.round(g[f] * Math.pow(10, f + 1)) / Math.pow(10, f + 1) + "x^" + f + " + " : 1 === f ? Math.round(100 * g[f]) / 100 + "x + " : Math.round(100 * g[f]) / 100; return { points: d, parameter: g, expression: x } } }, u = function (r, t, n) { return a[r](t, n) }; return u }.call(t, n, t, r), !(void 0 !== e && (r.exports = e)) }, function (r, t, n) { var e; e = function (r) { var t = {}; return t.max = n(6), t.deviation = n(5), t.mean = n(7), t.median = n(15), t.min = n(8), t.quantile = n(3), t.sampleVariance = n(9), t.sum = n(10), t }.call(t, n, t, r), !(void 0 !== e && (r.exports = e)) }, function (r, t, n) { var e; e = function (r) { function t(r) { return e(r, .5) } var e = n(3); return t }.call(t, n, t, r), !(void 0 !== e && (r.exports = e)) }, function (r, t, n) { var e; e = function (r) { var t = n(2), e = t.getPrecision; return function (r, t, n, o) { var a = arguments.length; a < 2 ? (t = r, r = 0, n = 1) : a < 3 ? n = 1 : a < 4 ? (n = +n, o = e(n)) : o = +o; for (var u = Math.ceil(((t - r) / n).toFixed(o)), i = new Array(u + 1), f = 0; f < u + 1; f++)i[f] = +(r + f * n).toFixed(o); return i } }.call(t, n, t, r), !(void 0 !== e && (r.exports = e)) }, function (r, t, n) { var e; e = function (r) { return function (r, t, n) { var e = Math.abs(t - r) / n, o = Math.floor(Math.log(e) / Math.LN10), a = Math.pow(10, o), u = e / a; return u >= Math.sqrt(50) ? a *= 10 : u >= Math.sqrt(10) ? a *= 5 : u >= Math.sqrt(2) && (a *= 2), +(t >= r ? a : -a).toFixed(-o) } }.call(t, n, t, r), !(void 0 !== e && (r.exports = e)) }]) });</script>
  <style>
    .main {
      height: 100vh;
      color: #333;
      /* background: darkcyan; */
      background: rgb(243, 243, 243);
      padding: 15px 15px 0;
      overflow-y: auto;
    }

    #all-chart {
      height: 100%;
      display: -ms-flexbox;
      display: flex;
      -ms-flex-direction: row;
      flex-direction: row;
      -ms-flex-wrap: wrap;
      flex-wrap: wrap;
      -ms-flex-align: center;
      align-items: center;
      -ms-flex-pack: justify;
      justify-content: space-between;
    }

    .chart-container {
      cursor: pointer;
      width: 100%;
      height: 100%;
      -webkit-tap-highlight-color: transparent;
      user-select: none;
      position: relative;
    }
  </style>

<body>

  <div class='main manu-main' id="echart-scatter">
    <div id="all-chart">
      <div class="chart-container" id='bar-chart'></div>
    </div>
  </div>
</body>
<script>
  [1, 2, 3].forEach((item, index) => {
    console.log(item, index)
  })
  var vm = new Vue({
    el: '#echart-scatter',
    data: {
      // data: [],  //曲线图数据
      // data0: [],  //2018数据
      // data1: [],  // 2019数据
      legendData: [],
      servers: {},
      myRegression: {},
      model: [
        {
          data: [
            [1, 1.76],
            [2, 1.76],
            [3, 2.86],
            [4, 2.56],
            [5, 3.24],
            [6, 3.15],
            [7, 3.35],
            [8, 3.5]
          ],
          data0: [
            [1, 1.76, 3520000, "PENTAX", "201901"],
            [2, 1.76, 3520000, "PENTAX", "201902"],
            [3, 2.86,31600000, "PENTAX", "201903"],
            [4, 2.56, 31600000, "PENTAX", "201904"],
            [5, 3.24, 31240000, "PENTAX", "201905"],
            [6, 3.15, 34939999, "PENTAX", "201906"],
            [7, 3.35, 34939999, "PENTAX", "201907"],
            [8, 3.5, 51939999, "PENTAX", "201908"]
          ],
          data1: null
        },
        {
          data: [
            [1, 2.26],
            [2, 2.76],
            [3, 2.86],
            [4, 2.86],
            [5, 3.24],
            [6, 3.15],
            [7, 3.55],
            [8, 4],
            [9, 4.2],
            [10, 4.2],
            [11, 4.5],
            [12, 4.3],
            [13, 4.6],
            [14, 4.8],
            [15, 4.8],
            [16, 4.7],
            [17, 4.8],
            [18, 4.7]
          ],
          data0: [
            [1, 2.26, 2520000, "卡尔史托斯 Karl Storz", "201901"],
            [2, 2.76, 7520000, "卡尔史托斯 Karl Storz", "201902"],
            [3, 2.86, 11600000, "卡尔史托斯 Karl Storz", "201903"],
            [4, 2.86, 11600000, "卡尔史托斯 Karl Storz", "201904"],
            [5, 3.24, 21240000, "卡尔史托斯 Karl Storz", "201905"],
            [6, 3.15, 24939999, "卡尔史托斯 Karl Storz", "201906"],
            [7, 3.55, 24939999, "卡尔史托斯 Karl Storz", "201907"],
            [8, 4, 51939999, "卡尔史托斯 Karl Storz", "201908"],
            [9, 4.2, 51939999, "卡尔史托斯 Karl Storz", "201908"],
            [10, 4.2, 51939999, "卡尔史托斯 Karl Storz", "201908"],
            [11, 4.5, 51939999, "卡尔史托斯 Karl Storz", "201908"],
            [12, 4.3, 51939999, "卡尔史托斯 Karl Storz", "201908"],
            [13, 4.6, 51939999, "卡尔史托斯 Karl Storz", "201908"],
            [14, 4.8, 51939999, "卡尔史托斯 Karl Storz", "201908"],
            [15, 4.8, 51939999, "卡尔史托斯 Karl Storz", "201908"],
            [16, 4.7, 51939999, "卡尔史托斯 Karl Storz", "201908"],
            [17, 4.8, 51939999, "卡尔史托斯 Karl Storz", "201908"],
            [18, 4.7, 51939999, "卡尔史托斯 Karl Storz", "201908"]
          ],
          data1: null
        },
        {
          data: [
            [1, 2.76],
            [2, 2.76],
            [3, 3.26],
            [4, 3.26],
            [5, 3.24],
            [6, 3.15],
            [7, 3],
            [8, 3]
          ],
          data0: [
            [1, 2.76, 11520000, "天松", "201901"],
            [2, 2.76, 11520000, "天松", "201902"],
            [3, 3.26, 11600000, "天松", "201903"],
            [4, 3.26, 11600000, "天松", "201904"],
            [5, 3.24, 11240000, "天松", "201905"],
            [6, 3.15, 14939999, "天松", "201906"],
            [7, 3, 11939999, "天松", "201907"],
            [8, 3, 14939999, "天松", "201908"]
          ],
          data1: null
        },
        {
          data: [
            [1, 4.26],
            [2, 4.76],
            [3, 3.86],
            [4, 4.86],
            [5, 4.24],
            [6, 4.15],
            [7, 4.35],
            [8, 4],
            [9, 4.1],
            [10, 4.2],
            [11, 4.5],
            [12, 4.3],
            [13, 4.6],
            [14, 4.8],
            [15, 4.8],
            [16, 4.7],
            [17, 4.8],
            [18, 4.7]
          ],
          data0: [
            [1, 4.26, 2520000, "沈大", "201901"],
            [2, 4.76, 7520000, "沈大", "201902"],
            [3, 3.86, 11600000, "沈大", "201903"],
            [4, 3.86, 11600000, "沈大", "201904"],
            [5, 4.24, 21240000, "沈大", "201905"],
            [6, 4.15, 24939999, "沈大", "201906"],
            [7, 4.35, 24939999, "沈大", "201907"],
            [8, 4, 51939999, "沈大", "201908"],
            [9, 4.1, 51939999, "沈大", "201908"],
            [10, 4.2, 51939999, "沈大", "201908"],
            [11, 4.5, 51939999, "沈大", "201908"],
            [12, 4.3, 51939999, "沈大", "201908"],
            [13, 4.6, 51939999, "沈大", "201908"],
            [14, 4.8, 51939999, "沈大", "201908"],
            [15, 4.8, 51939999, "沈大", "201908"],
            [16, 4.7, 51939999, "沈大", "201908"],
            [15, 4.8, 51939999, "沈大", "201908"],
            [16, 4.7, 51939999, "沈大", "201908"]
          ],
          data1: null
        },
      ]
    },
    mounted() {
      this.drawScatter(this.model);
    },
    methods: {

      drawScatter(model) {
        this.legendData = [];
        this.servers = [];
        this.myRegression = {};
        const curNode = document.getElementById('bar-chart');
        let myChart = echarts.init(curNode);

        model.forEach((item, index) => {
          this.legendData.push(item.data0[0][3])  //标题
          console.log(this.legendData)
          this.myRegression['myRegression_' + index] = ecStat.regression('logarithmic', item.data); //趋势线
          this.myRegression['myRegression_' + index].points.sort(function (a, b) {
            return a[0] - b[0];
          });
          let seriesList = {
            name: item.data0[0][3],
            type: 'line',
            lineStyle: {
              normal: {
                // color: '#'+this.getRandomColor()
              }
            },
            smooth: true,
            showSymbol: false,
            data: this.myRegression['myRegression_' + index].points,
            markPoint: {
              itemStyle: {
                normal: {
                  color: 'transparent'
                }
              },
              label: {
                normal: {
                  show: true,
                  position: 'left',
                  formatter: this.myRegression['myRegression_' + index].expression,
                  textStyle: {
                    color: '#333',
                    fontSize: 16
                  }
                }
              },
              data: [{
                coord: this.myRegression['myRegression_' + index].points[this.myRegression['myRegression_' + index].points.length - 1]
              }]
            }
          }
          this.servers.push(seriesList);
        });

        myChart.setOption({
          legend: {
            data: this.legendData,
            bottom: 20,
            textStyle: {
              // color: '#fff'
              fontSize: 16
            }
          },
          title: {
            text: '数据分析预测',
            right: '49%',
            textStyle: {
              fontSize: 24
              // color: '#fff'
            }
          },
          tooltip: {
            trigger: 'axis',
            axisPointer: {
              type: 'cross'
            },
            formatter: function (params) {
              // return params
              console.log(params);
              let tooltipCon = ""
              params.forEach((item, index) => {
                let i = item.seriesIndex;
                let j = item.dataIndex;
                console.log(i);
                tooltipCon += '<span style=\"display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:' + item.color + ';\"></span>' +
                  model[i].data0[j][3] + '<br>' +
                  // '品牌：' + model[i].data0[j][3] + '<br>' +
                  '例数：' + model[i].data0[j][0] + '<br>' +
                  '月份：' + model[i].data0[j][4] + '<br>' +
                  '平均分：' + model[i].data0[j][1] + '<br><br>' 
                  // +
                  // '总分：' + model[i].data0[j][2] + '<br><br>'
              })
              return tooltipCon
            }
          },
          grid: {
            top: 80,
            bottom: 90
          },
          xAxis: {
            type: 'value',
            splitLine: {
              lineStyle: {
                type: 'dashed'
              }
            },
            axisLine: {
              lineStyle: {
                // color: '#fff'
              }
            },
            axisLabel: {
              fontSize: 14
              // color: '#fff'
            }
          },
          yAxis: {
            type: 'value',
            splitLine: {
              lineStyle: {
                type: 'dashed'
              }
            },
            axisLine: {
              lineStyle: {
                // color: '#fff'
              }
            },
            axisLabel: {
              fontSize: 14
              // color: '#fff'
            }
          },
          series: this.servers
        })
        window.addEventListener('resize', function () { myChart.resize() })
      }
    }
  })



  // #此处有图形展示，充分考虑到黑白打印的效果：
  
  // 【图形占位】

  // #曲线取值说明：
  // 1) 曲线A：D值4.52、K值0.85
  // 2) 曲线B：D值4.02、K值0.62
  // 3) 曲线C：D值3.71、K值0.53
  // 4) 曲线D：D值3.66、K值0.98

  // 上述4条预测曲线中基于Y = D + Kln(X)的回归分析算法，
  // 红、黄、蓝、橙分别代表A、B、C、D四个品牌，
  // 所有品牌取M例样本数据，50 - M例为预测数据；
  // 其中X轴代表评价例数、Y轴代表每例评价所有子项的评分均值，D代表已评例数的均值，K表示品牌影响力，
  // 为品牌已有评分例数与分数的线性斜率的分段均值，在即决定预测值的增速；
  
  // 从以上预测曲线可以看出，已有评测数据中，
  // 品牌A的评分均值最大为4.52，品牌影响力K值0.85，符合该品牌厂家在医用内窥镜领域的一线品牌表现；
  // 品牌B的评分均值4.02，从已有数据中我们看到，该品牌在售后服务速度上评分不高，是拉低其整体得分的主要原因，故在后续工作中，该厂家应加强售后服务团队的整体表现；
  // 品牌C整体表现都很一般，主要因为在产品设计、使用、优化等方面无突出表现，致使其市场认可度不高，尤其在某些特定医用内窥镜手术中，其表现远不如品牌A与B，该厂家后续的市场调研应着重放在产品本身的使用感知上；
  // 品牌D目前评分较低，但因其近期在医用内窥镜视野领域，新型摄像头的应用，获得了增速较快的评价，其品牌有极大的市场潜力，也是目前最被看到的厂家，后续会联合该厂家，在专业性较强的手术中开展专项产品优化，不断提升产品价值
</script>